home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-10-28 | 19.8 KB | 437 lines | [TEXT/CCL ] |
- Allegro CL release 1.1 Release Notes October 28, 1987
-
- Copyright © Coral Software Corp
-
-
- This document describes changes in Allegro CL 1.1, and includes additions to
- the printed documentation.
-
- Please read the following notes carefully. They provide information which is
- not given elsewhere.
-
-
-
- HIGHLIGHTS
-
- Many version 1.0 bugs have been fixed in Version 1.1. Perhaps the most
- important were a bug that caused crashes on 68000-based Macintoshes, and
- several bugs in hash tables. If you had bugs in version 1.0, please check to
- make sure that they are fixed in this version. There are a small number of
- outstanding bugs that we are aware of. These are listed at the end of this
- file.
-
- A comprehensive index has been added to the manual.
-
- Definitions of traps and records are no longer built into the system; they are
- now given as source code. To use traps or records, you should load the
- corresponding files from the library folder. A good technique is to place
- (REQUIRE 'TRAPS) and/or (REQUIRE 'RECORDS) at the top of any files which use
- these definitions.
-
- Removing these definitions freed up about 80K more heap space for
- user programs. The trap definitions now include many Macintosh II
- traps, including color quickdraw traps.
-
- Besides traps and records, code written for version 1.0 should run
- without alteration in version 1.1. You should not need to recompile
- your files.
-
- Allegro CL now runs in the background under Multifinder. This means that you
- can perform all Lisp operations--including compiling files--while using another
- program in the foreground.
-
- Several example files have been added.
-
- Allegro CL version 1.1 is dedicated to the people who gave us feedback on
- version 1.0. Thanks!
-
-
-
- TOOLS
- The list-definitions dialog no longer performs unnecessary window refreshing.
-
- The Apropos menu-item now uses a simpler dialog. To get the functionality of
- the version 1.0 Apropos dialog, load the file library;Smart-Apropos.lisp.
-
- The variables for determining the size and position of the listener were
- improperly documented in release 1.0. The correct names of the variables are
- *LISTENER-WINDOW-SIZE* and *LISTENER-WINDOW-POSITION*.
-
-
- FRED
- When a fred window search causes scrolling, the found text is no longer placed
- at the top of the window. Instead, there are a number of lines left visible
- above the found text. The number is determined by the variable
- *NEXT-SCREEN-CONTEXT-LINES* (which is also used by the fred commands for
- scrolling from the keyboard).
-
- Fred windows now store and display their window-filenames with embedded escape
- characters. This fixes a problem that came up in version 1.0 when editing
- files with names which contained exclamation points and semicolons.
-
- The functions IN-PACKAGE and EXPORT now work properly with a window's package.
-
- There are now three methods for setting a window's package. In addition to
- the standard mode-line and the function SET-WINDOW-PACKAGE, a window's package
- will be set if the first expression in the window is an IN-PACKAGE
- statement. As with a mode-line, this method only works if the expression
- is there when the window is opened. It does not work by simply making
- the IN-PACKAGE statement the first form typed into or evaluated from the
- window.
-
-
- OBJECTS
- INIT-LIST-DEFAULT is now a macro, as documented. Each KEY argument is
- evaluated. The EXPRESSIONs are only evaluated if they are used.
- Examples:
- (setq args '(:a 1 b 2 :c 3))
- (init-list-default args 'b 20 :c 30 :d (+ 4 40) 'e (+ 5 50))
- => (:D 44 E 55 :A 1 B 2 :C 3)
- args => (:A 1 B 2 :C 3)
-
- (init-list-default args :a (progn (print "shouldn't") 10)
- :d (progn (print "should") (+ 4 40))) =>
- "should" ;printed
- (:D 44 :A 1 B 2 :C 3) ;value returned
-
- The root object now maintains an OBJECT-CHILDREN instance variable.
-
- The function REMAKE-OBJECT does not propagate the new inheritance path to
- its children and instances. This is a bug.
-
-
- WINDOWS
- When WINDOW-DRAW-CONTENTS is called, drawing is clipped to the update-region.
- the update-region includes areas which the operating system thinks needs to be
- redrawn (e.g. the portions of a window which have been uncovered). To add an
- area to the update-region, call the trap _INVALRECT or _INVALRGN.
- To force redrawing of the entire window, you can use
- (WITH-PORT WPTR
- (_INVALRECT :PTR (RREF WPTR WINDOW.PORTRECT)))
-
- Note that the traps _INVALRECT and _INVALRGN cause the Macintosh to post
- an update event. Because update events are handled asynchronously, these
- traps can immediately force an update. If you wish to invalidate several
- areas before updating, place the calls in the body of a WITHOUT-INTERRUPTS.
-
- Whenever a window is created or uncovered, an update event is posted for the
- window. The next time events are processed, WINDOW-UPDATE-EVENT-HANDLER
- will be called, which will in turn call WINDOW-DRAW-CONTENTS. The usual
- version of WINDOW-DRAW-CONTENTS erases the area within the window's update
- region (which generally means the entire contents of the window).
-
- Because event processing occurs asynchonously, WINDOW-UPDATE-EVENT-HANDLER may
- not be called for some time after the window is created or uncovered
- (in the default environment, up to 1/3 of a second). This means that drawing
- performed in the window immediately after the window is created or uncovered
- may be erased when WINDOW-UPDATE-EVENT-HANDLER is eventually called. To fix
- this problem, simply call the function EVENT-DISPATCH before drawing into the
- window. EVENT-DISPATCH forces the processing of any pending events. Note, it
- is only necessary to call EVENT-DISPATCH when drawing occurs soon after a
- window is created or uncovered.
-
- SET-WINDOW-FONT merges the given font-spec with the window's current font
- spec. Say a window currently uses the font-spec ("MONACO" 9 :PLAIN :SRCCOPY),
- Having it (SET-WINDOW-FONT 12) will change it to ("MONACO" 12 :PLAIN :SRCCOPY).
- In Allegro CL 1.0 it would have changed it to ("CHICAGO" 12 :PLAIN :SRCCOPY).
-
- There is a typo on page 6-3, in the Windows chapter. In the example at the
- bottom of the page, the call to EXIST should be given the argument NIL, rather
- than no argument.
-
- Documentation for supporting the Save and Save As… menu-items has been added
- to the Windows chapter. It appears on the chapter's last page.
-
- The object function WINDOW-HARDCOPY may be defined for any window or class of
- windows. If a window has a definition of WINDOW-HARDCOPY, then the Print
- menu-item will be enabled when that window is on top. The WINDOW-HARDCOPY
- function will be called when the user chooses the Print menu-item.
-
- The EXIST function for windows can take a :WPTR init-list option. If given,
- this should be a pointer to a window record on the Macintosh heap. The new
- window object will be built around this record. This option can be used to
- integrate new types of windows (e.g. color windows), into the object system.
- When this is done, the windows should be created invisibly, and then shown
- after they are set up.
-
- When the user clicks in the zoom-box of a window, the zooming is done by
- calling WINDOW-ZOOM-EVENT-HANDLER. This function may be shadowed. It takes
- one argument, which will be 8 if the window is zooming to the default
- position, and 7 if it is zooming to the alternate position.
-
- Grow icons are now drawn correctly in resizable windows. If you wish to
- explicitly redraw a grow-icon (e.g. after you have drawn over it), you should
- call the function WINDOW-DRAW-GROW-ICON. When a window is not the active
- window, WINDOW-DRAW-GROW-ICON erases the rectangle where the grow icon appears.
-
- Two object variables constrain the way in which windows may be resized and
- moved with the mouse. These are WINDOW-GROW-RECT and WINDOW-DRAG-RECT. Both
- these variables should point to rectangle records (though the data in
- WINDOW-GROW-RECT is actually used as two points).
-
- The two corner points of WINDOW-GROW-RECT determine the minimum and
- maximum size that the user can grow the window with the mouse. Note
- that the user can still zoom the window to other sizes, and the other
- sizes can be set with the function SET-WINDOW-SIZE.
-
- The rectangle WINDOW-DRAG-RECT constrains moving the window with the mouse.
- Whenever the mouse moves outside this rectangle, the gray drag rectangle
- disappears, indicating that the user is out-of-bounds. Note, this effect
- is determined by the position of the mouse, not the potential new position
- of the window. If the user clicks in the right or left side of the title
- bar, he/she will be able to drag the window within a different range.
-
- Most windows do not have an instance variable for these values.
- Instead, they use the values inherited from the class *WINDOW*. If
- you wish to constrain a particular class or instance, you must
- first give it its own copy of the variable by asking it to HAVE the
- variable. If you just do a SETQ without first doing a have, you will
- be effecting *WINDOW*'s variables, and all windows will be effected.
-
- Because the rectangles used by WINDOW-DRAG-RECT and WINDOW-GROW-RECT
- are stored on the Macintosh heap, they are not garbage collected.
- Any instance which has one of the rectangles must dispose of it
- explicitly. This is most conveniently done by calling DISPOSE-RECORD
- from within WINDOW-CLOSE.
-
-
- DIALOGS
- The following function can be used to force the redrawing of a single cell in
- a table. This often looks much better than redrawing the entire table (which
- is what happens when you call DIALOG-ITEM-DRAW). It is useful when you change
- the value of one cell and want to update the table.
-
- (defobfun (draw-cell *table-dialog-item*) (cell)
- (let* ((cell-pos (cell-position cell)))
- (when cell-pos
- (with-port (ask my-dialog wptr)
- (rlet ((cell-rect rect))
- (rset cell-rect rect.topleft cell-pos)
- (rset cell-rect rect.bottomright (add-points cell-pos
- (cell-size)))
- (ccl::draw-table-cell cell
- cell-rect
- (cell-selected-p cell)))))))
-
- *USER-DIALOG-ITEM* holds an abstract class of dialog-items which should be used
- as the parent of any dialog-item classes created by the programmer. See the
- icon-dialog-items file for an example.
-
- DIALOG-ITEM-CLICK-EVENT-HANDLER is the function called by the event system
- when the user clicks on a dialog item. This function usually performs mouse-
- tracking, and (if the mouse is released while still over the dialog-item)
- calls DIALOG-ITEM-ACTION. See the icon-dialog-items file for an example of the
- use of this function.
-
- PROGRAMMING FRED
- The variable *CONTROL-X-COMTAB* is bound to the comtab used by the control-x
- keystroke.
-
- Each fred-window maintains an instance variable LAST-COMMAND. Whenever a fred
- command is run, the special variable *LAST-COMMAND* is bound to the value of
- this instance variable. A fred command can set the value of the instance
- variable or check the value of the special variable. In this way a fred
- command can respond to context (e.g. by doing something different if it is
- called several times in a row). Most built-in fred commands simply set
- LAST-COMMAND to NIL.
-
- The function GET-SELECTED-STRING returns--as a string--the selection from
- the topmost fred window. If the topmost fred window has no text selected, nil
- is returned. Note that this function can take a very long time if an entire
- large buffer is selected.
-
-
- EVENTS
- WINDOW-CLICK-EVENT-HANDLER is not called when the user clicks in a control in
- a window (such as a scroll-bar). Instead, the function WINDOW-CONTROL-CLICK-
- EVENT-HANDLER is called. If you want to build a window with controls, you
- should define this function for the window. WINDOW-CONTROL-CLICK-EVENT-HANDLER
- is not really necessary, and will probably be removed from a future release, but
- you may need to use it in the mean time.
- WINDOW-CONTROL-CLICK-EVENT-HANDLER takes four arguments: CONTROL-HANDLE, CODE,
- WHERE, and MODS. CONTROL-HANDLE is a handle to the control which was clicked.
- CODE indicates the part of the control which was clicked. WHERE is the mouse
- position where the click occured. And MODS indicates which modifier keys were
- held down during the click.
-
- The function WINDOW-KEY-EVENT-HANDLER is not called when the command key is
- held down. This is a bug.
-
-
-
-
- DEBUGGING
- The methods for getting into and out of break loops has been cleaned up.
- Command-. causes an abort, which throws to top level or up one break level.
- Command-. is no longer used to enter a break-loop.
- Command-, causes a break.
- Command-/ causes a continue.
- The abort/break/continue functionality is also available through menu-items on
- on the Eval menu, and through the functions ABORT, BREAK, and CONTINUE.
-
- The backtrace dialog no longer displays the addresses of functions (as this
- information is not usually useful). It does display an A5 offset for
- annonymous built-in functions. This offset can be helpful when reporting
- bugs to Coral.
-
- The variable *D* used in the backtrace dialog has been renamed *DEBUG-VALUE*.
-
- Two special variables control the print-length and print-level used by TRACE.
- These are *TRACE-PRINT-LENGTH* and *TRACE-PRINT-LEVEL*. They correspond to the
- variables *PRINT-LENGTH* and *PRINT-LEVEL* except that they control the output
- of the TRACE function rather than the pretty printer. (See Common Lisp: the
- Language, page 372).
-
- The macro PRINT-DB is used to print out forms and their values. PRINT-DB takes
- any number of arguments. For each argument, it prints the argument, and prints
- the result of evaluating the argument (except for string constants, which are
- only printed once). All information is printed to *ERROR-OUTPUT*. PRINT-DB
- returns the value of its last argument. It is semantically equivalent to a
- PROGN with the side affect of printing. PRINT-DB is useful for tracking the
- values of variables, and flow of control inside programs.
-
- STEP is performed in the null lexical environment and current dynamic
- environment, just like EVAL. If you insert a call to STEP in the middle of
- a function, beware that arguments to the function and other lexical entities
- will not be visible inside the body of the STEP form.
-
- PASCAL RECORDS
- Most of the predefined record types described in the manual are no longer
- predefined. Instead, they are given as source code in the Records.Lisp file in
- the Library folder. If you need to use records, you may want to look through
- this file for record definitions. To load all the record definitions, you can
- evaluate the expression (REQUIRE 'RECORDS).
-
- The rectangle record definition is still predefined by Allegro CL.
-
- RSET and RREF compile into simply memory accessing functions. They access
- record definitions at compile time, but not at run time. The same is true of
- RLET when initial field values are not given. All other record functions use
- the record definitions at run time.
-
- To avoid the need for record definitions at run time, use only RSET, RREF, and
- the simple case of RLET. These operations are also the most efficient.
- Compiled files which use these operations can be loaded and run in a system
- that contains no record definitions.
-
- The complex case of RLET (where initial values are given) can easily be changed
- into the simple case. For example
-
- (rlet ((r :rect
- :topleft #@(10 10)
- :bottomright #@(100 100)))
- . . . )
-
- would become
-
- (rlet ((r :rect))
- (rset r rect.topleft #@(10 10))
- (rset r rect.bottomright #@(100 100))
- . . .)
-
-
- SYSTEM INTERFACE
- The definitions for Macintosh traps are no longer compiled into Allegro CL. If
- you need to call traps directly, you should load the file Traps.Lisp in the
- Library folder. You may want to selectively comment-out portions of this file,
- to avoid loading lots of traps you don't need. Loading the entire file uses up
- about 50K of heap space. The simplest way to include trap definitions is to
- evaluate the form (REQUIRE 'TRAPS).
-
- Macintosh traps return boolean values as fixnums. This fixnum will have
- bit 8 turned on if the boolean value is true. For example
- (LOGBITP 8 (_BUTTON :WORD)) will return true if the mouse-button is held down.
-
- When passing boolean values to the Macintosh operating system, use -1 as true,
- and 0 as false.
-
- The function documented as %inc-pointer is actually named %inc-ptr.
-
- After disposing of Macintosh pointers, it is important to zero all Lisp
- variables holding the pointer (e.g. by setting them to NIL). If the Macintosh
- and Lisp heaps resize, dead pointers may begin pointing into active pages in
- the Lisp heap. This will confuse the garbage collector and probably cause
- a crash.
-
-
- FILES
- When LOAD is passed a filename with no type, it checks for the existence of the
- file with no type before checking for files with a .lisp or .fasl added to the
- file name. In the past LOAD always merged with .lisp and .fasl, so that it was
- impossible to load files with no type.
-
- The :directory keyword to the function CHOOSE-NEW-FILE-DIALOG can specify a
- filename as well as a directory. This filename is used as the default
- filename when the dialog is displayed.
-
- The variable *OPEN-FILE-STREAMS* is bound to a list of all currently open
- files. This list is useful for closing all open files.
-
-
- IMPLEMENTATION NOTES
- The search performed by APROPOS is case sensitive. This means that when
- APROPOS is given a string as an argument, the string should generally be
- all upper-case (unless you know that you are looking for a symbol containing
- lower-case letters). The Apropos dialog available from the Tools menu
- automatically upcases the entered string.
-
- *WARN-IF-REDEFINE-KERNEL* determines whether warnings are issued when built-in
- non-object functions are redefined. If it is NIL, no warning is given. This
- variable should usually be non-NIL, but may be bound to NIL when redefining
- such functions as SHORT-SITE-NAME. *WARN-IF-REDEFINE* is still used for
- user functions and built-in object functions.
-
- The function UNCOMPILE-FUNCTION returns the definition of a compiled function.
- This definition is only available if the function was compiled with
- *SAVE-DEFINITIONS* non-NIL.
-
-
- MANUAL
- The manual now includes a glossary, a comprehensive index, and tabs for
- dividing chapters.
-
- Several typos have been fixed.
-
- MISCELLEANOUS
- If the cursor is hidden when a garbage collection occurs, the cursor is auto-
- matically shown. You don't have to jiggle the mouse.
-
- Functions for calling Macintosh printer drivers have been exported. These
- functions correspond to the high-level functions described in Inside Macintosh
- (except that they have '%_' prepended to their names).
-
- %_PROPEN %_PRCLOSE %_PRINTDEFAULT
- %_PRVALIDATE %_PRSTLDIALOG %_PRJOBDIALOG
- %_PRJOBMERGE %_PROPENDOC %_PROPENPAGE
- %_PRCLOSEPAGE %_PRCLOSEDOC %_PRPICFILE
-
- In addition, the function GET-PRINT-RECORD has been exported. This function
- can only be called after %_PROPEN has been called and before %_PRCLOSE has
- been called. It returns a handle to print record (described in Inside
- Macintosh). Note: all print manager hacking must be surrounded by a call
- to WITHOUT-INTERRUPTS. This is true because Lisp event processing interferes
- with the print manager. The unfortunate side-effect is that such code is
- difficult to debug.
-
- The function HARDCOPY-FILE takes a single argument, which should be a pathname
- to a text file. It opens a window to the file, prints the window, and closes
- the window. For example:
- (HARDCOPY-FILE (CHOOSE-FILE-DIALOG
- :MAC-FILE-TYPE :TEXT))
-
-
- KNOWN BUGS
- If code running from the Listener is interruped by a mouse event which
- in turn causes an error, (CONTINUE) goes to top level rather than resuming
- the listener code.
-
- In FORMAT to synonym string of standard output, ~& casues stack overflow.
-
- Definitions of the form (DEF PKG:FOO ...) or (DEF PKG::FOO) are not
- properly recognized by EDIT-DEFINITION.
-
- Imbalanced parentheses inside a semicolon comment will confuse the backward
- matching parentheses feature.
-
- The function MAKUNBOUND-ALL does not unbind non-object variables. It just sets
- them to NIL.